home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
MRAC
/
Lengths
/
Modify
/
l-add-up-range
next >
Wrap
Lisp/Scheme
|
1998-08-11
|
614b
|
24 lines
l-add-up-range range pattern
0-based
This function enables the adding up of selected note-lengths by <range>.
(setq len1 (qlength '20-11011))
(setq len2 (qlength '((20-11011) (24-1131) (16-13) (20-14))))
(l-add-up-range '(3 5) len1)
=> (1/20 1/20 -1/20 1/10)
In the example above, the <range> parameter is set to add up note-lengths between 3 and 5.
(setq range
(pick-rnd1 .56 :content 2
(g-integer 0 (l-count :all :content len2))))
=> ((0 4) (4 2) (2 0) (1 0))
internally to: ((0 4) (2 4) (0 2) (0 1))
(l-add-up-range range len2)
=> ((1/10 1/20) (1/24 1/24 1/6) (1/4) (1/20 1/5))